
package com.jf.cloud.api.order.constant;

/**
 * 财务明细类型 1.订单&退款 2.余额充值 3.会员购买
 * @author zz
 */
public enum FinanceType {
    /**
     * 订单&退款
     */
    ORDER(1, "订单"),
    /**
     * 余额充值
     */
    RECHARGE(2, "余额充值"),

    /**
     * 会员购买
     */
    LEVEL(3, "会员购买");

    private final Integer num;
    private final String str;

    FinanceType(Integer num, String str) {
        this.num = num;
        this.str = str;
    }

    public Integer value() {
        return num;
    }

    public String str() {
        return str;
    }

    public static FinanceType instance(Integer value) {
        FinanceType[] enums = values();
        for (FinanceType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
